﻿using System.ComponentModel;
using Newtonsoft.Json;

namespace Ecobee.Net
{
	public class SelectionItems : ApiObject
	{
		private bool _includeRuntime = false;
		private bool _includeExtendedRuntime = false;
		private bool _includeElectricity = false;
		private bool _includeSettings = false;
		private bool _includeLocation = false;
		private bool _includeProgram = false;
		private bool _includeEvents = false;
		private bool _includeDevice = false;
		private bool _includeTechnician = false;
		private bool _includeUtility = false;
		private bool _includeManagement = false;
		private bool _includeAlerts = false;
		private bool _includeWeather = false;
		private bool _includeHouseDetails = false;
		private bool _includeOemCfg = false;
		private bool _includeEquipmentStatus = false;
		private bool _includeNotificationSettings = false;
		private bool _includePrivacy = false;

		/// <summary>
		/// Include the thermostat runtime object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeRuntime", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeRuntime
		{
			get
			{
				return _includeRuntime;
			}
			set
			{
				_includeRuntime = value;
			}
		}

		/// <summary>
		/// Include the extended thermostat runtime object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeExtendedRuntime", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeExtendedRuntime
		{
			get
			{
				return _includeExtendedRuntime;
			}
			set
			{
				_includeExtendedRuntime = value;
			}
		}

		/// <summary>
		/// Include the electricity readings object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeElectricity", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeElectricity
		{
			get
			{
				return _includeElectricity;
			}
			set
			{
				_includeElectricity = value;
			}
		}

		/// <summary>
		/// Include the thermostat settings object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeSettings", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeSettings
		{
			get
			{
				return _includeSettings;
			}
			set
			{
				_includeSettings = value;
			}
		}

		/// <summary>
		/// Include the thermostat location object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeLocation", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeLocation
		{
			get
			{
				return _includeLocation;
			}
			set
			{
				_includeLocation = value;
			}
		}

		/// <summary>
		/// Include the thermostat program object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeProgram", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeProgram
		{
			get
			{
				return _includeProgram;
			}
			set
			{
				_includeProgram = value;
			}
		}

		/// <summary>
		/// Include the thermostat calendar events objects. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeEvents", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeEvents
		{
			get
			{
				return _includeEvents;
			}
			set
			{
				_includeEvents = value;
			}
		}

		/// <summary>
		/// Include the thermostat device configuration objects. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeDevice", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeDevice
		{
			get
			{
				return _includeDevice;
			}
			set
			{
				_includeDevice = value;
			}
		}

		/// <summary>
		/// Include the thermostat technician object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeTechnician", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeTechnician
		{
			get
			{
				return _includeTechnician;
			}
			set
			{
				_includeTechnician = value;
			}
		}

		/// <summary>
		/// Include the thermostat utility company object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeUtility", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeUtility
		{
			get
			{
				return _includeUtility;
			}
			set
			{
				_includeUtility = value;
			}
		}

		/// <summary>
		/// Include the thermostat management company object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeManagement", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeManagement
		{
			get
			{
				return _includeManagement;
			}
			set
			{
				_includeManagement = value;
			}
		}

		/// <summary>
		/// Include the thermostat's unacknowledged alert objects. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeAlerts", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeAlerts
		{
			get
			{
				return _includeAlerts;
			}
			set
			{
				_includeAlerts = value;
			}
		}

		/// <summary>
		/// Include the current thermostat weather forecast object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeWeather", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeWeather
		{
			get
			{
				return _includeWeather;
			}
			set
			{
				_includeWeather = value;
			}
		}

		/// <summary>
		/// Include the current thermostat house details object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeHouseDetails", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeHouseDetails
		{
			get
			{
				return _includeHouseDetails;
			}
			set
			{
				_includeHouseDetails = value;
			}
		}

		/// <summary>
		/// Include the current thermostat OemCfg object. If not specified, defaults to false.
		/// </summary>
		[JsonProperty(PropertyName = "includeOemCfg", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeOemCfg
		{
			get
			{
				return _includeOemCfg;
			}
			set
			{
				_includeOemCfg = value;
			}
		}

		/// <summary>
		/// Include the current thermostat equipment status information. If not specified, defaults to false. 
		/// </summary>
		[JsonProperty(PropertyName = "includeEquipmentStatus", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeEquipmentStatus
		{
			get
			{
				return _includeEquipmentStatus;
			}
			set
			{
				_includeEquipmentStatus = value;
			}
		}

		/// <summary>
		/// Include the current thermostat alert and reminders settings. If not specified, defaults to false. 
		/// </summary>
		[JsonProperty(PropertyName = "includeNotificationSettings", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludeNotificationSettings
		{
			get
			{
				return _includeNotificationSettings;
			}
			set
			{
				_includeNotificationSettings = value;
			}
		}

		/// <summary>
		/// Include the current thermostat privacy settings. Note: access to this object is restricted to 
		/// callers with implicit authentication, setting this value to true without proper credentials will 
		/// result in an authentication exception. 
		/// </summary>
		[JsonProperty(PropertyName = "includePrivacy", DefaultValueHandling = DefaultValueHandling.Ignore)]
		[DefaultValue(false)]
		public bool IncludePrivacy
		{
			get
			{
				return _includePrivacy;
			}
			set
			{
				_includePrivacy = value;
			}
		}

		/// <summary>
		/// Copies the properties of selectionItems to this instance of
		/// Ecobee.Net.SelectionItems.
		/// </summary>
		/// <param name="selectionItems">The Ecobee.Net.SelectionItems instance that contains the properties to copy.</param>
		public void SetSelectionItems(SelectionItems selectionItems)
		{
			this.IncludeRuntime = selectionItems.IncludeRuntime;
			this.IncludeExtendedRuntime = selectionItems.IncludeExtendedRuntime;
			this.IncludeElectricity = selectionItems.IncludeElectricity;
			this.IncludeSettings = selectionItems.IncludeSettings;
			this.IncludeLocation = selectionItems.IncludeLocation;
			this.IncludeProgram = selectionItems.IncludeProgram;
			this.IncludeEvents = selectionItems.IncludeEvents;
			this.IncludeDevice = selectionItems.IncludeDevice;
			this.IncludeTechnician = selectionItems.IncludeTechnician;
			this.IncludeUtility = selectionItems.IncludeUtility;
			this.IncludeManagement = selectionItems.IncludeManagement;
			this.IncludeAlerts = selectionItems.IncludeAlerts;
			this.IncludeWeather = selectionItems.IncludeWeather;
			this.IncludeHouseDetails = selectionItems.IncludeHouseDetails;
			this.IncludeOemCfg = selectionItems.IncludeOemCfg;
			this.IncludeEquipmentStatus = selectionItems.IncludeEquipmentStatus;
			this.IncludeNotificationSettings = selectionItems.IncludeNotificationSettings;
			this.IncludePrivacy = selectionItems.IncludePrivacy;
		}
	}
}
